1. Field of the Invention
The present invention relates to an image processing device, an image processing method, a program of the same, and a computer readable recording medium recorded with the program for specifying a region in an input image based on a correlation value with a model image, in particular, to calculation of the correlation value in a color image.
2. Description of the Related Art
Automation has been carried out in manufacturing premises from a viewpoint of saving energy and enhancing efficiency. Various sensor types using light, electricity, electric wave, sound wave and the like are used to realize automation. Among the sensor types, an image processing device for performing defect determination of a product and production management of the product by photographing the products and half finished products, and processing the photographed image is effective. A detecting function similar to the detection by vision of human can be realized with the image processing device, and thus an application range thereof is wide.
Such an image processing device executes processes (hereinafter collectively referred to as pattern search process) such as determination of whether or not a region having a predetermined color or pattern is present in an input image, detection of the number of regions present in the input image, and detection of a position and orientation (rotation angle) of the region present in the input image. Such a pattern search process is achieved by calculating the normalized correlation value of the model image acting as a reference and a region having the same size as the model image out of the input image obtained by photographing the object, as disclosed in “Image processing (Image Processing Standard Text book)”, Computer Graphic Arts Society, p. 260, Feb. 25, 1997.
With advancement in recent information technique, a pattern search process employing the color image has been realized in place of a conventional gray image (gray scale image). In the general color image, the colors are defined with gray values of “red”, “green” and “blue” based on the three primary colors of light. In other words, the gray image is defined by a one-dimensional gray value, whereas the color image is defined by a three-dimensional gray value.
A method of calculating a color difference in a scalar between each component of the gray value of a reference color registered in advance and each component of the gray value in each pixel of a target color image, and executing the pattern search process based on the color difference is proposed, as disclosed in Japanese Laid-Open Patent Publication No. 7-203476.